<table class="Member" style="text-align:right">
    <thead>
       <th width="15%"></th>
       <th width=""></th>
    </thead>
    <tbody>
<tr>
	<th><span style="color:red">* </span>广告名&nbsp;</th>
	<td class="left"><input type="text" name="ad_info[name]" value="<!--{$T.ad_info.name}!-->" class="input_text"/></td>
</tr>
<tr>
	<th>开始时间&nbsp;</th>
	<td class="left">
		<input type="text" name="ad[start_time]" value="<!--{$T.ad.start_time}!-->" class="input_text"/>
		<font color="#666666">(如2011-10-11 00:00:00 留空为不限制)</font>
	</td>
</tr>
<tr>
	<th>结束时间&nbsp;</th>
	<td class="left">
		<input type="text" name="ad[end_time]" value="<!--{$T.ad.end_time}!-->" class="input_text"/>
		<font color="#666666">(如2011-10-11 00:00:00 留空为不限制)</font>
	</td>
</tr>

<!--{if !$T.adid}!-->
<tr>
	<th><span style="color:red">* </span>类型&nbsp;</th>
	<td class="left">
		<select name="ad[type]" id="ad_type" onchange="type_change()">
			<option value="image" <!--{if $T.ad.type == 'image'}!-->selected="selected"<!--{/if}!-->>图片广告</option>
			<option value="slide" <!--{if $T.ad.type == 'slide'}!-->selected="selected"<!--{/if}!-->>焦点图</option>
		</select>
	</td>
</tr>
<!--{else}!-->
<tr>
	<th><span style="color:red">* </span>类型&nbsp;</th>
		<td class="left"><!--{if $T.ad.type == "image"}!-->图片广告<!--{else}!-->焦点图<!--{/if}!--><input type="hidden" name="ad[type]" value="<!--{$T.ad.type}!-->" />
	</td>
</tr>
<!--{/if}!-->
<tr>
	<th><span style="color:red">* </span>链接打开方式&nbsp;</th>
	<td class="left">
		<select name="ad[target]">
			<option value="" <!--{if !$T.ad.target}!-->selected="selected"<!--{/if}!-->>在当前窗口打开</option>
			<option value="_target" <!--{if $T.ad.target=='_target'}!-->selected="selected"<!--{/if}!-->>在新窗口打开</option>
		</select>
	</td>
</tr>
<tbody id="image_attr" class="type_attr" <!--{if $T.ad.type != 'image' && $T.ad.type}!-->style="display:none;"<!--{/if}!-->>
	<tr>
		<th><span style="color:red">* </span>图片地址&nbsp;</th>
		<td class="left">
			<input type="text" name="image_image[src]" value="<!--{$T.image_image.src}!-->" class="input_text" readonly="true"/>
			<input type="file" name="image_image_file" size=5>
			<span id="plugin_floatdiv"><!--[图片预览]!--></span>
		</td>
	</tr>
	
	<div class="plugin_floatdiv" style="display:none;"><img src="<!--{$image_image.src}!-->" /></div>
	<style>.plugin_floatdiv{position:absolute;}</style>
	<script>
		$("#plugin_floatdiv").bind('mouseenter',
				function(e){
					$(".plugin_floatdiv").css('left',e.pageX);
					$(".plugin_floatdiv").css('top',e.pageY);
					$(".plugin_floatdiv").css('display','block');
				}
			);
		$("#plugin_floatdiv").bind('mouseleave',
				function(e){
					$(".plugin_floatdiv").css('display','none');
				}
			);
	</script>
	
	<tr>
		<th>图片规格&nbsp;</th>
		<td class="left">
			宽 <input type="text" name="image_image[width]" value="<!--{$T.image_image.width}!-->" class="input_text" size="4"/>(px) *
			高 <input type="text" name="image_image[height]" value="<!--{$T.image_image.height}!-->" class="input_text" size="4"/>(px)
		</td>
	</tr>
	<tr>
		<th>链接地址&nbsp;</th>
		<td class="left">
			<input type="text" name="image_image[url]" value="<!--{$T.image_image.url}!-->" class="input_text"/>
		</td>
	</tr>
	<tr>
		<th>提示文字&nbsp;</th>
		<td class="left">
			<input type="text" name="image_image[title]" value="<!--{$T.image_image.title}!-->" class="input_text"/>
		</td>
	</tr>
	<tr>
		<th>图片替换文字&nbsp;</th>
		<td class="left">
			<input type="text" name="image_image[alt]" value="<!--{$T.image_image.alt}!-->" class="input_text"/>
			(图片无法显示时的替换文字)
		</td>
	</tr>
</tbody>
<tbody id="slide_attr" class="type_attr" <!--{if $T.ad.type != 'slide'}!-->style="display:none;"<!--{/if}!-->>
	<tr>
		<td colspan="2">
			<script>
			function dopicadd()
			{var i;
			var str="";
			var oldi=0;
			var j=0;
			oldi=parseInt(document.getElementById("morepicnum").value);
			if(isNaN(oldi))
			oldi=0;
			for(i=1;i<=document.getElementById("downmorepicnum").value;i++)
			{
			j=i+oldi;
			str=str+"<tr><td width=5% align=center><input type=text name=slide_image_order[] size=1 value="+j+"></td><td width=45% align=center><input name=slide_image_src[] type=text size=28 id=msmallpic"+j+"><input type=file name=slide_image_file"+j+" size=10></td><td width=19% align=center><input type=text name=slide_image_url[]  size=20></td><td width=12% align=center><input name=slide_image_alt[]  type=text size=15></td><td width=19% align=center><input name=slide_image_title[] type=text size=19></td></tr>";
			}
			document.getElementById("addpicdown").innerHTML="<table width='100%' border=0 cellspacing=1 cellpadding=3>"+str+"</table>";
			}
			</script>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  	<tr> 
			    	<td class="left">
			    		<table width="100%" border=0 align=center cellpadding=3 cellspacing=1>
			  				<tr bgcolor="#DBEAF5"> 
						    	<td width="5%" align=center>排序</td>
						    	<td width="45%" align=center>大图</td>
						    	<td width="19%" align=center>链接地址</td>
						    	<td width="12%" align=center>替换文字</td>
						    	<td width="19%" align=center>图片说明</td>
			  				</tr>
						     <!--{if !$T.adid }!-->
								<!--{section name=list loop=3}!-->
                                <!--{assign var="k" value=$k+1}!-->
								<tr> 
									<td align=center>
										<input type="text" name="slide_image_order[]" size="1" value="<!--{$k}!-->"/>
									</td>
									<td align=center>
										<input type="text" name="slide_image_src[]" id='msmallpic<!--{$j}!-->' size=28>
										<input type="file" name="slide_image_file<!--{$k}!-->" size=10>										
									</td>
									<td align=center>
										<input type="text" name="slide_image_url[]" size="20" id='mpicurl<!--{$k}!-->'>
									</td>
									<td align=center>
										<input type="text" name="slide_image_alt[]" size="15" id='mpicurl<!--{$k}!-->'>
									</td>
									<td align=center>
										<input type="text" name="slide_image_title[]" size="20" id='mpicname<!--{$k}!-->'>
									</td>
								</tr>
								<!--{/section}!-->
                                <!--{assign var="morepicnum" value=3}!-->
						    <!--{else}!-->
								
                                <!--{section name=list loop=$T.slide_images}!-->
							    	<!--{assign var="i" value=$i+1}!-->
							   		<tr>
							   			<input type="hidden" name="slide_image_id[]" value="<!--{$T.slide_images[list].id}!-->">
										<td align=center>
											<input type="text" name="slide_image_order[]" size="1" value="<!--{$i}!-->"/>
											<input type="checkbox" name="slide_image_destroy[]" value="<!--{$T.slide_images[list].id}!-->">删
										</td>
										<td align=center>
											<input type="text" name="slide_image_src[]" id='msmallpic<!--{$i}!-->' size=28 value="<!--{$T.slide_images[list].src}!-->">
											<input type="file" name="slide_image_file<!--{$i}!-->" size=5>
										</td>
										<td align=center>
											<input type="text" name="slide_image_url[]" id='mpicurl<!--{$i}!-->' value="<!--{$T.slide_images[list].url}!-->" size="20">
										</td>
										<td align=center>
											<input type="text" name="slide_image_alt[]" id='mpicurl<!--{$i}!-->' value="<!--{$T.slide_images[list].alt}!-->" size="15">
										</td>
										<td align=center>
											<input type="text" name="slide_image_title[]" id='mpicname<!--{$i}!-->' value="<!--{$T.slide_images[list].title}!-->" size="20">
										</td>
									</tr>
									<!--{assign var="morepicnum" value=$i}!-->
                                    
								<!--{/section}!-->
						     <!--{/if}!-->
						    </table>
			    	</td>
			  	</tr>
			  	<tr> 
			    	<td height="25">
			    		广告图增加数量: <input name="morepicnum" type="hidden" id="morepicnum" value="<!--{$morepicnum}!-->">
			      		<input name="downmorepicnum" id="downmorepicnum" type="text" value="1" size="6">
			      		<input type="button" name="Submit5" value="增加广告图" onclick="javascript:dopicadd();">
				  	</td>
			  	</tr>
			  	<tr> 
			    	<td id=addpicdown></td>
			  	</tr>
			</table>
		</td>
	</tr>
</tbody>

<tr>
	<th>广告描述&nbsp;</th>
	<td class="left"><textarea name="ad_info[description]" cols="75" rows="10"><!--{$T.ad_info.description}!--></textarea></td>
</tr>
<script>
function type_change()
{
	$(".type_attr").css("display", "none");
	$("#"+$("#ad_type").val()+"_attr").css("display", "table-row-group");
}
</script>


    </tbody>
  </table>
